﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace GenericModels
{
    [KnownType(typeof(Show))]
    [KnownType(typeof(List<Seat>))]
    [DataContract]
    public class PartBooking
    {
        private int id;
        private Show theShow;
        private List<Seat> seats;
        private bool isPaid;
        private int bookingId;


        public PartBooking()
        {
            this.id = 0;
            this.theShow = null;
            this.isPaid = false;
            this.seats = new List<Seat>();
            this.bookingId = 0;
        }

        public PartBooking(int id, Show theShow, bool isPaid, int bookingId)
        {
            this.id = id;
            this.theShow = theShow;
            this.isPaid = false;
            this.seats = new List<Seat>();
            this.bookingId = bookingId;
        }

        #region getters and setters
        [DataMember]
        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        [DataMember]
        public Show TheShow
        {
            get { return theShow; }
            set { theShow = value; }
        }

        [DataMember]
        public List<Seat> Seats
        {
            get { return seats; }
            set { seats = value; }
        }

        [DataMember]
        public bool IsPaid
        {
            get { return isPaid; }
            set { isPaid = value; }
        }

        [DataMember]
        public int BookingId
        {
            get { return bookingId; }
            set { bookingId = value; }
        }
        #endregion
    }
}
